package org.sny7.openOfflineList.listener;

import java.util.ArrayList;
import java.util.Collections;

import javax.swing.DefaultComboBoxModel;

public class FilterComboBoxModel extends DefaultComboBoxModel {
	
	private ArrayList<String> items = new ArrayList<String>();
	
	private static final long serialVersionUID = 1L;

	public Object getElementAt(int index) {
		return items.get(index);
	}

	public int getSize() {
		return items.size();
	}
	
	public void add(String text) {
		items.add(text);
	}
	
	public void clear() {
		items.clear();
	}
	
	public void sort() {
		Collections.sort(items);
	}

}
